home *** CD-ROM | disk | FTP | other *** search
- Path: news.netspace.net.au!usenet
- From: TorrBoy@Netspace.net.au (Peter J. Torr)
- Newsgroups: comp.lang.c++
- Subject: Derived class not calling overloaded base class function
- Date: 17 Feb 1996 09:24:50 GMT
- Organization: Dedicated PSB and Sandra Bullock fan
- Message-ID: <4g46t2$3vd@otis.netspace.net.au>
- Reply-To: TorrBoy@netspace.net.au
- NNTP-Posting-Host: dialup-a1-20.mel.netspace.net.au
- X-Newsreader: WinVN 0.99.7
-
- Hi,
-
- Hopefully a very simple question someone can answer for me!
-
- I have a class, say 'foo' (everyone's favourite) which has a member function
- 'int Get(void)'
-
- I then derive a class (say 'goo') which has as a base class foo. If goo has a
- function also called Get, but with different params (say ''char *Get(char *)') I can't
- seem to get the base class' Get() function to operate within the derived class.
-
- If I say just plain "Get()" it says too few parameters (for Get(char *)". If I use
- "::Get()" the compiler complains Get should have a prototype. If I say "foo.Get()" it
- says improper use of typedef foo. The only way seems to be to explicitly cast the
- this pointer to a foo.
-
- Surely there is a better way than this? Thanks for any help (e-mail preferred)
-
- Peter
-
- --
- IF YOU USE MICROSOFT(r) EXCHANGE, YOU CAN RECEIVE MAIL IN RTF
- FORMAT.
- Peter J. Torr
- TorrBoy@NetSpace.Net.AU
- Shit! This signature violates the Communications Decency Act!
-
-